﻿// the controller is dependent on the bootstrappedData service to retrieve the 
// courses list for use
// the module which is known to the html page section or entire page is acting a logical container for controller 
registrationModule.controller("AccountController", function ($scope, accountRepository, $location) {
    $scope.save = function (student) {
        $scope.error = false;
        accountRepository.save(student).$promise.then(
            function() {$location.url('Registration/Courses'); },
            function () {$scope.error = true;});
    };
});